#!/bin/bash

#https://segmentfault.com/a/1190000000264347
#http://rmingwang.com/vagrant-commands-and-config.html
#http://ninghao.net/blog/2077

set -ex
export DEBIAN_FRONTEND=noninteractive

cd ~
pwd

sudo yum -y install wget
sudo mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
sudo mv /etc/yum.repos.d/epel.repo /etc/yum.repos.d/epel.repo.backup
sudo mv /etc/yum.repos.d/epel-testing.repo /etc/yum.repos.d/epel-testing.repo.backup
sudo wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
sudo wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
sudo yum clean all
sudo yum makecache
sudo yum -y update

sudo yum -y groupinstall "Development Tools"
sudo yum -y install git vim-enhanced zsh htop

sudo wget --no-check-certificate https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh
cat /etc/shells
chsh -s /bin/zsh
sudo chsh -s /bin/zsh
cp .zshrc .zshrc.bak

git clone https://github.com/amix/vimrc.git ~/.vim_runtime
sh -ex ~/.vim_runtime/install_awesome_vimrc.sh

sudo cp -f /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

sudo yum install -y kernel-devel gcc
cd /opt/VBoxGuestAdditions-*/init  
sudo ./vboxadd setup

#mysql
http://repo.mysql.com/
http://mirrors.aliyun.com/
http://mirrors.163.com/


#yum search mysql | grep -i --color mysql
#rpm -qa | grep jdk
#sudo yum -y remove 

#java
bureau
alias cl="clear"

JAVA_HOME=/usr/local/program/java
CLASSPATH=$JAVA_HOME/lib
PATH=$PATH:$JAVA_HOME/bin

set nu
set tabstop=4
set nobackup
set cursorline
set ruler
set autoindent



